﻿using FCP.Data.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FCP.Api.Models
{
    public class FCPEditConfigModel
    {
        public FCPEditConfigModel()
        {
            this.SubEdits = new List<EditConfigModel>();
        }
        public t_form Form { get; set; }

        public EditConfigModel Edit { get; set; }
        public List<EditConfigModel> SubEdits { get; set; }
    }
    public class EditConfigModel
    {
        public EditConfigModel()
        {
            this.Fields = new List<EditFieldConfigModel>();
            this.Panels = new List<EditPanelConfigModel>();
            this.Btns = new List<EditBtnConfigModel>();
            this.RowBtns = new List<EditBtnConfigModel>();
            this.SubEdits = new List<EditConfigModel>();
        }
        public string Code { get; set; }
        public bool IsTop { get; set; }
        public bool IsSubTop { get; set; }
        public bool HasChildren { get; set; }
        //public t_form Form { get; set; }

        public t_edit Edit { get; set; }

        public List<EditFieldConfigModel> Fields { get; set; }

        public List<EditPanelConfigModel> Panels { get; set; }

        public List<EditBtnConfigModel> Btns { get; set; }
        public List<EditBtnConfigModel> RowBtns { get; set; }


        public string NavFields { get; set; }

        //public EditConfigModel ParentEdit { get; set; }

        public List<EditConfigModel> SubEdits { get; set; }

    }

    public class EditFieldConfigModel
    {
        public EditFieldConfigModel()
        {
            this.FilterFields = new List<EditFieldFilterFieldConfigModel>();
            this.Maps = new List<EditFieldMapConfigModel>();
        }
        public t_edit_field Field { get; set; }

        public List<EditFieldFilterFieldConfigModel> FilterFields { get; set; }

        public List<EditFieldMapConfigModel> Maps { get; set; }
    }

    public class EditFieldFilterFieldConfigModel
    {
        public t_edit_field_filter_field FilterField { get; set; }
    }

    public class EditFieldMapConfigModel
    {
        public EditFieldMapConfigModel()
        {
            this.Details = new List<EditFieldMapDetailConfigModel>();
        }
        public t_edit_field_map Map { get; set; }

        public List<EditFieldMapDetailConfigModel> Details { get; set; }
    }
    public class EditFieldMapDetailConfigModel
    {
        public t_edit_field_map_detail MapDetail { get; set; }
    }
    public class EditPanelConfigModel
    {
        public t_edit_panel Panel { get; set; }
    }

    public class EditBtnConfigModel
    {
        public t_edit_btn Btn { get; set; }
    }
}
